// src/utils/icons.ts
import type { Component } from 'vue';
import * as icons from '@element-plus/icons-vue';

// type IconName = keyof typeof icons;

/** 解决使用动态组件渲染ElementPlus图标失效问题 */
export function getIcon(name: string): Component | null {
  return (icons as Record<string, Component>)[name] || null;
}
